<template>
	<div>
		<el-col :span="24">
			<el-card class="box-card">
				<div slot="header" class="clearfix">
					<span>系统信息</span>
				</div>
				<el-row>
					<el-col v-for="item in sysInfo" :span="12" style="line-height: 2em;">
						<el-col :span="8" :offset="4">
							<div class="">{{item.title}}：</div>
						</el-col>
						<el-col :span="12">
							<div class="">{{item.value}}</div>
						</el-col>
					</el-col>
				</el-row>
			</el-card>
		</el-col>
	</div>
</template>

<script>
	import http from 'assets/js/http.js'
	export default {

		data() {
			return {
				sysInfo: [
					{
						title: '服务器操作系统',
						value: 'Linux(114.55.34.251)'
					},
					{
						title: '服务器操作系统',
						value: 'Linux(114.55.34.251)'
					},
					{
						title: 'PHP版本',
						value: '5.6.30'
					},
					{
						title: 'MySQL版本',
						value: '5.6.30'
					}
				]
			}
		},
		created() {

		},
		methods: {
			init() {
				// 基本数据获取
				this.tableData()
			},
			tableData() {
				// 表格数据
				const data = {
					params: this.getCondition()
				}
				// 请求地址
				let url = this.config.baseApi
				this.apiPost(url, data).then(res => {
					console.log('获取邀请码res', res)
					this.handelResponse(res, data => {

						this.data.received.table = data.select
						this.data.received.count = data.select.length
						_g.closeGlobalLoading()
					})
				})
			},
			getCondition() {
				// 搜索优化配置
				let temp = this.data.exchanged.search
				let params = {}
				for(let key in temp) {
					if(temp[key]) {
						params[key] = temp[key]
					}
				}
				return params
			},

			handleAvatarSuccess(res, file) {
				this.Add.data.form[this.Add.config.form.uploadImg.prop] = res.data
				// this.imageUrl =
			},
			beforeAvatarUpload(file) {
				const isLt2M = file.size / 1024 / 1024 < 2
				if(!isLt2M) {
					this.$message.error('上传图片大小不能超过 2MB!')
				}
				return isLt2M
			},
			modIntegration() {
				let data = {
					vitation: this.vitation,
					be_vitation: this.be_vitation
				}
				this.apiPost('/AdminApi/OtherAdmin/scorePerson', data).then(res => {
					this.handelResponse(res, data => {
						this.$message({
							message: '修改成功',
							type: 'success'
						});
					})
				})

			}
		},
		mixins: [http]
	}
</script>

<style scoped>
	.el-input,
	.el-input__inner {
		width: auto;
	}
</style>